/*
 * XML Type:  booksType
 * Namespace: http://jugbrescia.dev.java.net/library
 * Java type: net.java.dev.jugbrescia.library.BooksType
 *
 * Automatically generated - do not modify.
 */
package net.java.dev.jugbrescia.library.impl;
/**
 * An XML booksType(@http://jugbrescia.dev.java.net/library).
 *
 * This is a complex type.
 */
public class BooksTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.java.dev.jugbrescia.library.BooksType
{
    
    public BooksTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName BOOK$0 = 
        new javax.xml.namespace.QName("", "book");
    
    
    /**
     * Gets the "book" element
     */
    public net.java.dev.jugbrescia.library.BookType getBook()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.java.dev.jugbrescia.library.BookType target = null;
            target = (net.java.dev.jugbrescia.library.BookType)get_store().find_element_user(BOOK$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "book" element
     */
    public void setBook(net.java.dev.jugbrescia.library.BookType book)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.java.dev.jugbrescia.library.BookType target = null;
            target = (net.java.dev.jugbrescia.library.BookType)get_store().find_element_user(BOOK$0, 0);
            if (target == null)
            {
                target = (net.java.dev.jugbrescia.library.BookType)get_store().add_element_user(BOOK$0);
            }
            target.set(book);
        }
    }
    
    /**
     * Appends and returns a new empty "book" element
     */
    public net.java.dev.jugbrescia.library.BookType addNewBook()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.java.dev.jugbrescia.library.BookType target = null;
            target = (net.java.dev.jugbrescia.library.BookType)get_store().add_element_user(BOOK$0);
            return target;
        }
    }
}
